import request from '@/utils/request';

// 获取菜品列表
export const getDishes = ({ page, size }) => {
    return request.get('/dishes', { params: { page, size } });
};

// 添加菜品
export const addDish = (dish) => {
    return request.post('/dishes', dish);
};

// 更新菜品
export const updateDish = (id, dish) => {
    return request.put(`/dishes/${id}`, dish);
};

// 删除菜品
export const deleteDish = (id) => {
    return request.delete(`/dishes/${id}`);
};
